using System;
using System.Collections.Generic;
using System.Text;

namespace ExchangeHog.Pop3Client.Responses
{
    internal sealed class ListResponse : Pop3Response
    {
        public List<Pop3ListItem> Items { get; set; }

        public int MessageNumber { get { return Items[0].MessageId; } }

        public long Octets { get { return Items[0].Octets; } }

        public ListResponse(Pop3Response response, List<Pop3ListItem> items)
            : base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
        {
            if (items == null)
                throw new ArgumentNullException("items");

            Items = items;
        }
    }
}
